package com.codedancer.campus.manager.service.excel;

import cn.afterturn.easypoi.excel.annotation.Excel;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品导出excel
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CommodityExcel {

    @Excel(name = "商品标题", width = 50, height = 20)
    private String title;

    @Excel(name = "商品描述", width = 150)
    private String description;

    @Excel(name = "商品原价", width = 20)
    private String originalPrice;

    @Excel(name = "商品现价", width = 20)
    private String currentPrice;

    @Excel(name = "商品分类", width = 30)
    private String categoryName;

    @Excel(name = "发布人", width = 30)
    private String publishNickName;

    @Excel(name = "联系电话", width = 30)
    private String contactPhone;

    @Excel(name = "发布学校", width = 30)
    private String publishSchoolName;

    @Excel(name = "状态", width = 20)
    private String status;

    @Excel(name = "是否同步自由广场", width = 20, replace = {"同步_true", "未同步_false"})
    private Boolean isSyncLibertySquare;

    @Excel(name = "发布时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public String getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(String originalPrice) {
        this.originalPrice = "￥" + originalPrice;
    }

    public String getCurrentPrice() {
        return currentPrice;
    }

    public void setCurrentPrice(String currentPrice) {
        this.currentPrice = "￥" + currentPrice;
    }
}
